package com.cj.springmvc.test.bo.impl;

import javax.jws.WebMethod;
import javax.jws.WebService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

import com.cj.springmvc.test.bo.PersonsBo;
import com.cj.springmvc.test.bo.PersonsService;
import com.cj.springmvc.test.dto.PersonsDto;

/**
 * web service exporter :JAX-WS SOA
 * 我把此包置于了一个错误的位置(之前置于task包中)，因为此远程调用使用到了DAO 与数据库进行了交互，个人觉得应该置于bo包内。
 * @author cj
 *
 */
@Component("personsService")
@WebService(serviceName="PersonsService")
public class PersonServiceEndpoint implements PersonsService{

	@Autowired
	@Qualifier("personsBo")
	PersonsBo personsBo;
	
	@WebMethod
	public void addPerson(PersonsDto dto) {
		personsBo.doSaveNewmember(dto);
	}
	
	@WebMethod
	public void deletePerson(Long id) {
		personsBo.doDeletePerson(id);
	}
}
